	package elements.axis ;
	import flash.display.Sprite;
	import elements.axis.Structs.AXISSTRUCT;
	
	class YAxisRight extends YAxisBase {

		public function new( json:Dynamic ) {
			
			super( json, 'y_axis_right' );
			
			//
			// OK, the user has set the right Y axis,
			// but forgot to specifically set visible to
			// true, I think we can forgive them:
			//
			if( Reflect.hasField(json,'y_axis_right') )
				style.visible = true;
				
			this.labels = new YAxisLabelsRight( this, json );
			this.addChild( this.labels );
		}
		
		public override function get_style():Dynamic {
			//
			// default values for a right axis (turned off)
			//
			var style:AXISSTRUCT = {
				stroke:			2,
				tick_length:	3,
				color:			'#784016',
				offset:			false,
				grid_color:	'#F5E1AA',
				grid_visible:	false,	// <-- this is off by default for RIGHT axis
				three_d:			0,
				steps:			1,
				visible:		false,
				min:			0,
				max:			10
			};
			
			return style;
		}
		
		public override function resize( label_pos: Float, sc:ScreenCoords ):Void {
			
			super.resize_helper( label_pos, sc, true);
		}
	}
